Create
curl --request POST \
--url https://api.qa.sima.ag/api/v3/third_party/plots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{\\n \\\"area\\\": 38.77,\\n \\\"establishment_id\\\": {{new_establishment}},\\n \\\"latitude\\\": -33.01170951430673,\\n \\\"longitude\\\": -60.770449228584766,\\n \\\"name\\\": \\\"Plot 1\\\",\\n \\\"geometry\\\": \\\"{\\\\\\\"type\\\\\\\":\\\\\\\"Polygon\\\\\\\",\\\\\\\"coordinates\\\\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\\"\\n}\""
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/plots"
payload = "\"{\n \\"area\\": 38.77,\n \\"establishment_id\\": {{new_establishment}},\n \\"latitude\\": -33.01170951430673,\n \\"longitude\\": -60.770449228584766,\n \\"name\\": \\"Plot 1\\",\n \\"geometry\\": \\"{\\\\"type\\\\":\\\\"Polygon\\\\",\\\\"coordinates\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\"\n}\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': '*/*'
},
body: JSON.stringify('"{\n \"area\": 38.77,\n \"establishment_id\": {{new_establishment}},\n \"latitude\": -33.01170951430673,\n \"longitude\": -60.770449228584766,\n \"name\": \"Plot 1\",\n \"geometry\": \"{\\\"type\\\":\\\"Polygon\\\",\\\"coordinates\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\"\n}"')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/plots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.sima.ag/api/v3/third_party/plots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('"{\\n \\"area\\": 38.77,\\n \\"establishment_id\\": {{new_establishment}},\\n \\"latitude\\": -33.01170951430673,\\n \\"longitude\\": -60.770449228584766,\\n \\"name\\": \\"Plot 1\\",\\n \\"geometry\\": \\"{\\\\\\"type\\\\\\":\\\\\\"Polygon\\\\\\",\\\\\\"coordinates\\\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\"\\n}"'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": 294126,
"name": "Plot 1",
"establishment_id": 120767,
"area": 38.77,
"geometry": "{\"type\":\"Polygon\",\"coordinates\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}",
"latitude": -33.011709514307,
"longitude": -60.770449228585,
"external_code": null,
"external_reference": null,
"created_at": "2024-10-09T16:55:45-03:00",
"modified_at": "2024-10-09T16:55:45-03:00",
"deleted_at": null,
"active": true
}Version 3 > Plots
Create
POST
/
api
/
v3
/
third_party
/
plots
Create
curl --request POST \
--url https://api.qa.sima.ag/api/v3/third_party/plots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{\\n \\\"area\\\": 38.77,\\n \\\"establishment_id\\\": {{new_establishment}},\\n \\\"latitude\\\": -33.01170951430673,\\n \\\"longitude\\\": -60.770449228584766,\\n \\\"name\\\": \\\"Plot 1\\\",\\n \\\"geometry\\\": \\\"{\\\\\\\"type\\\\\\\":\\\\\\\"Polygon\\\\\\\",\\\\\\\"coordinates\\\\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\\"\\n}\""
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/plots"
payload = "\"{\n \\"area\\": 38.77,\n \\"establishment_id\\": {{new_establishment}},\n \\"latitude\\": -33.01170951430673,\n \\"longitude\\": -60.770449228584766,\n \\"name\\": \\"Plot 1\\",\n \\"geometry\\": \\"{\\\\"type\\\\":\\\\"Polygon\\\\",\\\\"coordinates\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\"\n}\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': '*/*'
},
body: JSON.stringify('"{\n \"area\": 38.77,\n \"establishment_id\": {{new_establishment}},\n \"latitude\": -33.01170951430673,\n \"longitude\": -60.770449228584766,\n \"name\": \"Plot 1\",\n \"geometry\": \"{\\\"type\\\":\\\"Polygon\\\",\\\"coordinates\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\"\n}"')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/plots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.sima.ag/api/v3/third_party/plots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('"{\\n \\"area\\": 38.77,\\n \\"establishment_id\\": {{new_establishment}},\\n \\"latitude\\": -33.01170951430673,\\n \\"longitude\\": -60.770449228584766,\\n \\"name\\": \\"Plot 1\\",\\n \\"geometry\\": \\"{\\\\\\"type\\\\\\":\\\\\\"Polygon\\\\\\",\\\\\\"coordinates\\\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\"\\n}"'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": 294126,
"name": "Plot 1",
"establishment_id": 120767,
"area": 38.77,
"geometry": "{\"type\":\"Polygon\",\"coordinates\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}",
"latitude": -33.011709514307,
"longitude": -60.770449228585,
"external_code": null,
"external_reference": null,
"created_at": "2024-10-09T16:55:45-03:00",
"modified_at": "2024-10-09T16:55:45-03:00",
"deleted_at": null,
"active": true
}Authorizations
access_token obtenido via POST /api/v2/login
Identificador del sistema integrador (8 para Third-Party API)
Body
*/*
The body is of type string.
Example:
"\"{\\n \\\"area\\\": 38.77,\\n \\\"establishment_id\\\": {{new_establishment}},\\n \\\"latitude\\\": -33.01170951430673,\\n \\\"longitude\\\": -60.770449228584766,\\n \\\"name\\\": \\\"Plot 1\\\",\\n \\\"geometry\\\": \\\"{\\\\\\\"type\\\\\\\":\\\\\\\"Polygon\\\\\\\",\\\\\\\"coordinates\\\\\\\":[[[178.89312744140625,-0.3968350154009376],[178.99749755859375,-0.5506383054954145],[179.22821044921875,-0.45176514769114756],[178.89312744140625,-0.3968350154009376]]]}\\\"\\n}\""
Response
Created
The response is of type object.

